﻿@model MvcControls.Web.Helpers.DateRangeHelperInfo
@{ 
    var fromPropId = Model.FromFieldName.Replace('.', '_') + "Id";
    var toPropId = Model.ToFieldName.Replace('.', '_') + "Id";
}
<label for="from">
    From</label>
<input type="text" id="@fromPropId" name="@Model.FromFieldName" value="@Model.FromValue"/>
<label for="to">
    To</label>
<input type="text" id="@toPropId" name="@Model.ToFieldName" value="@Model.ToValue"/>
<script type="text/javascript">

    $core.dateRange(
        '@fromPropId',
        '@toPropId',
         @Model.NumberOfMonths);

</script>
